#!/usr/bin/perl
# revtrap.cgi


require 'snmp-lib.pl';


#&header($text{'index_title'}, "", undef, undef, 1);
&ReadParse();
&error_setup("Remove Trap Receiver");

my $hostName = $in{hostName};

my $lineEntry = "";

#print $lineEntry;
my $code = &WriteConfFile($hostName, $lineEntry);
if($code)
{
	&error( "Failed!");
	&nas_syslog("snmp","naslog_warning",13013,"SNMP module, remove trap receiver failed!");
}
else
{
	&nas_syslog("snmp","naslog_info",13014,"SNMP module, remove trap receiver successful!");
	&redirect("index.cgi");
}


#&footer("/ucd-snmp/trapremove.cgi",$text{'traprev_title'});
